<?php require_once('../../core/import.php');?>
<?php User::Permission('EMPHASES'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=8" />
    <script type="text/javascript" src="../../scripts/import.js"></script>
    <script type="text/javascript" src="../../scripts/components/kindeditor/import.kindeditor.js"></script>
    <script type="text/javascript" src="scripts/emphases.edit.js"></script>
    <script type="text/javascript">
    	function This_URL(){
		document.getElementById("urls").style.display="";
		document.getElementById("contents").style.display="none";
		}
	function This_Content(){
		document.getElementById("urls").style.display="none";
		document.getElementById("contents").style.display="";
		}
    </script>
</head>

<body>
	<?php
    
    #获取数据
    $Data=DB::GetRows('select * from dm_other where ID=1');
    $Data=$Data[0];
    {
	?>
    <form id="Form1" name="Form1" method="post" action="emphases.edit.action.php" enctype="multipart/form-data" class="Form">
        <fieldset>
            <legend>重点报道</legend>
            <table width="100%" cellpadding="1" cellspacing="0">
            <tr>
                <td width="130" height="25" align="left">标题：</td>
                <td width="909" colspan="2">
                    <input type="text" id="Title" name="Title" value="<?php echo $Data['Title'];?>" class="Textbox" />
                </td>
            </tr>
            <tr>
             	<td height="25" align="left" valign="middle">缩略图：</td>
            	<td colspan="2"><input type="File" id="ThumbnailPath" name="ThumbnailPath" class="Textbox" />
                   <?php if($Data['ThumbnailPath']){?>
                  <a href="<?php echo Config::PATH_RELATIVE_ATTACHMENT_TEMP.'/'.$Data['ThumbnailPath']; ?>" target="_blank">点击查看</a>
                  <?php }?>
                  </td>
            </tr>
            <tr>
                <td width="130" height="25" align="left">概述：</td>
                <td width="909" colspan="2">
                	<textarea id="Summary" name="Summary" style="width:60%; height:100px;"><?php echo $Data['Summary'];?></textarea>
                </td>
             </tr>
             <tr>
                <td width="130" height="25" align="left">是否链接：</td>
                <td width="909" colspan="2">
                  	<input type="radio" name="M_Type" onclick="This_URL();" value="链接" <?php if($Data['Type']=='链接'){ echo 'checked' ;}?> /> 链接&nbsp;
	  			<input type="radio" name="M_Type" onclick="This_Content();" value="内容" <?php if($Data['Type']=='内容'){ echo 'checked' ;}?>/> 内容 
            </tr>
             
             <tr id="urls" style="display:<?php if($Data['Type']!='链接') {?>none<?php }?> ">
                <td width="130" height="25" align="left">链接地址：</td>
                <td width="909" colspan="2">
                    <input type="hidden" id="ID" name="ID" value="<?php echo $Data['ID'];?>" />
                    <input type="text" id="URL" name="URL" size="100" value="<?php echo $Data['URL'];?>" class="Textbox" />
                </td>
             </tr>
            
            <tr id="contents" style="display:<?php if($Data['Type']!='内容') {?>none<?php }?>">
            	<td height="25" align="left" valign="top">内容：</td>
            	<td colspan="2"><textarea id="Content" name="Content" style="width:100%; height:500px;"><?php echo $Data['Content'];?></textarea></td>
            </tr>
            </table>
        </fieldset>

        <input id="ActionButton" name="ActionButton" type="submit" value="确定" class="button" /> <input id="ResetButton" name="ResetButton" type="reset" value="重置" class="button" />
    </form>
    <?php	
    }
    $Data=NULL;
	?>
</body>
</html>